﻿using System;
using System.Collections.Generic;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using Wjtour.Common;
using Hjp.FrameWork.Common;
using Wjtour.BLL;
using System.Linq;

namespace Wjtour.Web.Front
{
    public partial class scenicdetail : BasePage
    {
        protected int id = 1;
        scene_bll _bll = new scene_bll();
        protected Wjtour.Domain.scene data = new Domain.scene();
        protected int type = 1;
        protected List<Wjtour.Domain.line> recommendLines = new List<Domain.line>();
        Wjtour.BLL.line_bll _linebll = new line_bll();
        protected List<Wjtour.Domain.article> trafficGuides = new List<Domain.article>();//旅游攻略
        Wjtour.BLL.article_bll _articleBll = new article_bll();
        protected string scenetype = "";

        protected void Page_Load(object sender, EventArgs e)
        {
            id = Utils.StrToInt(Request["id"], 1);
            bindList();
        }

        void bindList()
        {
            data = _bll.Load(id);


            Dictionary<int, string> arr = new Dictionary<int, string>();
            arr.Add(1, "东太湖生态旅游度假区");
            arr.Add(2, "水乡古镇休闲旅游区");
            arr.Add(3, "丝绸商贸文化旅游区");

            foreach (var s in arr)
            {
                if (s.Key == data.scenetype)
                {
                    scenetype = s.Value;
                }

            }

            recommendLines = _linebll.GetAll<Wjtour.Domain.line>("select top 6 * from line where isrecommend=1").ToList();
            trafficGuides = _articleBll.GetAuditTopListWithFirstLogo("6", 7, 2);
        }
    }
}
